package com.hjp.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hjp.model.User;


@Controller
@RequestMapping("/userController")
public class UserController {
	
	///userController/showUser/id=1.do
	@RequestMapping("/showUser/{id}")
	public String showUser(@PathVariable String id, HttpServletRequest request) {
		User u = new User();
		u.setName(id);
		request.setAttribute("user", u);
		return "showUserid";
	}
}
